<template>
  <el-select v-model="value" placeholder="请选择快递">
    <el-option
      v-for="item in deliveryOptions"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
  </el-select>
</template>

<script>
export default {
  name: "SelectDelivery",
  props: {
    value: {
      type: [String, Number],
      default: ''
    },
  },
  watch: {
    value(val) {
      this.selectValue = val;
    }
  },
  mounted() {
    this.selectValue = this.value;
  },
  created() {
    this.getData();
  },
  data() {
    return {
      selectValue: '',
      deliveryOptions:[
        {label:'快递名1',value:'1'},
        {label:'快递名2',value:'2'},
      ],
    }
  },
  methods: {
    // 获取数据
    getData(){

    },
    changeValue(){
      this.$emit('input',this.selectValue)
      this.$emit('change', this.selectValue);
    },
  }
}
</script>

<style scoped>

</style>
